home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / SMETER.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-29  |  3.7 KB  |  139 lines

  1. 10  'SMETER - S-Meter vs. Power - 07 JUN 96 rev. 28 SEP 96
  2. 20  IF EX$=""THEN EX$="EXIT"
  3. 30  CLS:KEY OFF
  4. 40  COLOR 7,0,1
  5. 50  UL$=STRING$(80,205)
  6. 60  U$="###,###.###"
  7. 70  '
  8. 80  COLOR 15,2
  9. 90  PRINT " S-METER READINGS vs. POWER";TAB(57)"by George Murphy VE3ERP ";
  10. 100  COLOR 1,0:PRINT STRING$(80,223);
  11. 110  COLOR 7,0
  12. 120  '
  13. 130  '.....start
  14. 140  LOCATE 3:VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  15. 150  GOSUB 800     'preface
  16. 160  LOCATE 25,24:COLOR 15,4
  17. 170  PRINT " Press 1 to continue or 0 to EXIT ";
  18. 180  COLOR 7,0
  19. 190  Z$=INKEY$:IF Z$=""THEN 190
  20. 200  IF Z$="0"THEN CLS:RUN EX$
  21. 210  IF Z$="1"THEN 240
  22. 220  GOTO 190
  23. 230  '
  24. 240  LOCATE 3:VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  25. 250  PRINT " Describe a typical transmitter and its signal report:
  26. 260  PRINT UL$;
  27. 270  INPUT " ENTER: Power in watts......................";P
  28. 280  INPUT " ENTER: S-meter reading (9.00 or less)......";S
  29. 290  IF S<=9 THEN 310
  30. 300  BEEP:LOCATE CSRLIN-1:PRINT STRING$(80,32);:LOCATE CSRLIN-1:GOTO 280
  31. 310  B=P/4^S
  32. 320  PRINT B
  33. 330  LOCATE 3:VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  34. 340  PRINT " Relative Signal Strengths at Various Power Levels:
  35. 350  PRINT UL$;
  36. 360       FOR Z=1 TO 9
  37. 370  Y=10
  38. 380  IF FLAG=1 THEN FLAG=0:GOTO 400
  39. 390  IF S>Z-1 AND S<(Z)THEN 670
  40. 400  X=B*4^Z
  41. 410  GOSUB 740
  42. 420  COLOR 7,0
  43. 430  IF P=X OR P=X*10^3 OR P=X*10^6 THEN COLOR 0,7
  44. 440  PRINT " S";USING "#";Z;:PRINT TAB(Y);USING Z$;X;:PRINT W$;
  45. 450  IF P=X OR P=X*10^3 OR P=X*10^6 THEN 460 ELSE COLOR 7,0:GOTO 470
  46. 460  COLOR 0,7:PRINT " (reference level) ";
  47. 470  PRINT ""
  48. 480       NEXT Z
  49. 490  FOR Z=1 TO 4
  50. 500  X=B*4^9*10^Z:GOSUB 740
  51. 510  COLOR 7,0
  52. 520  PRINT " S9";USING "+##";Z*10;:PRINT TAB(Y);USING Z$;X;:PRINT W$"
  53. 530       NEXT Z
  54. 540  PRINT UL$;
  55. 550  T=8
  56. 560  PRINT TAB(T);
  57. 570  PRINT "These are the power levels required to achieve S-meter readings"
  58. 580  PRINT TAB(T);
  59. 590  PRINT "at levels other than the reference level."
  60. 600  PRINT
  61. 610  PRINT TAB(T);
  62. 620  PRINT "International regulations stipulate that no station should use more"
  63. 630  PRINT TAB(T);
  64. 640  PRINT "power than is necessary for the communication.";
  65. 650  GOTO 1210
  66. 660  '
  67. 670  COLOR 0,7
  68. 680  S$=STR$(S):S$=RIGHT$(S$,LEN(S$)-1)
  69. 690  PRINT " S";USING "#.#";S;:PRINT TAB(Y);USING Z$;P;:PRINT " watts ";
  70. 700  PRINT "(reference level) "
  71. 710  COLOR 0,7
  72. 720  FLAG=1:Z=Z-1:GOTO 480
  73. 730  '
  74. 740  '.....format display
  75. 750  Z$=U$:W$=" watts"
  76. 760  IF X>=10^3  THEN X=X/10^3:W$=" kilowatts"
  77. 770  IF X>=10^6  THEN X=X/10^6:W$=" megawatts"
  78. 780  RETURN
  79. 790  '
  80. 800  '.....preface
  81. 810  T=7:Z$=CHR$(34)
  82. 820  PRINT TAB(T);Z$;
  83. 830  PRINT "Because S meters are relative-reading instruments, signal reporting"
  84. 840  PRINT TAB(T);
  85. 850  PRINT "based on the amount of needle deflection is generally without"
  86. 860  PRINT TAB(T);
  87. 870  PRINT "meaning. No two receivers render the same reading of a given signal,"
  88. 880  PRINT TAB(T);
  89. 890  PRINT "unless by coincidence. This is because gain distribution within an"
  90. 900  PRINT TAB(T);
  91. 910  PRINT "amateur receiver varies from band to band. Since most S meters are"
  92. 920  PRINT TAB(T);
  93. 930  PRINT "activated from the AGC line in a receiver, what might be S9 on one"
  94. 940  PRINT TAB(T);
  95. 950  PRINT "ham band could easily become S6 or 10 dB over S9 on another band. A"
  96. 960  PRINT TAB(T);
  97. 970  PRINT "receiver that rendered accurate readings on each band it covered"
  98. 980  PRINT TAB(T);
  99. 990  PRINT "would be extremely esoteric and complex.";Z$;
  100. 1000  PRINT TAB(T);
  101. 1010  PRINT "(The 1994 ARRL HANDBOOK for RADIO AMATEURS, page 12-30)."
  102. 1020  PRINT
  103. 1030  PRINT TAB(T);
  104. 1040  PRINT "To increase your received signal by only ONE S-unit you need FOUR"
  105. 1050  PRINT TAB(T);
  106. 1060  PRINT "TIMES your current power. You need SIXTEEN times your current power"
  107. 1070  PRINT TAB(T);
  108. 1080  PRINT "for two S-units. If you are willing to decrease your signal by one"
  109. 1090  PRINT TAB(T);
  110. 1100  PRINT "S-unit (a barely discernible reduction to the listener) your power"
  111. 1110  PRINT TAB(T);
  112. 1120  PRINT "can be reduced to ONE-QUARTER of its current level."
  113. 1130  PRINT
  114. 1140  PRINT TAB(T);
  115. 1150  PRINT "(with TNX to IK5MDF in ";Z$;"RADIO REVISTA";Z$;" via Bob Eldridge,";
  116. 1160  PRINT " VE7BS, in"
  117. 1170  PRINT TAB(T);
  118. 1180  PRINT "the April 1996 issue of ";Z$;"THE CANADIAN AMATEUR";Z$;", page 24)"
  119. 1190  RETURN
  120. 1200  '
  121. 1210  '.....end
  122. 1220  GOSUB 1260
  123. 1230  GOTO 130
  124. 1240  END
  125. 1250  '
  126. 1260  'HARDCOPY
  127. 1270  GOSUB 1380:LOCATE 25,2:COLOR 14,6
  128. 1280  PRINT " Press 1 to print screen, 2 to print screen & ";
  129. 1290  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  130. 1300  Z$=INKEY$:IF Z$="3"THEN GOSUB 1380:RETURN
  131. 1310  IF Z$="1"OR Z$="2"THEN GOSUB 1380:GOTO 1330
  132. 1320  GOTO 1300
  133. 1330  FOR QX=1 TO 24:FOR QY=1 TO 80
  134. 1340  LPRINT CHR$(SCREEN(QX,QY));
  135. 1350  NEXT QY:NEXT QX
  136. 1360  IF Z$="2"THEN LPRINT CHR$(12)
  137. 1370  GOTO 1270
  138. 1380  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  139.